fix(desktop): preserve angle brackets in inline code - #5816
Conversation
Signed-off-by: Nick DiZazzo <nick.dizazzo@gmail.com>
|
nice small one @wesbillman |
|
worth asserting on the raw serializer output for that case. the reason it matters: overriding the minor, possibly a no-op: |
Chessing234
left a comment
There was a problem hiding this comment.
the escaping this removes is load-bearing outside inline code. the renderer is react-markdown v10 with no rehype-raw (shared/ui/markdown/nodeCache.ts:96), so raw html nodes are dropped rather than shown — typing use <config> to override as plain text serialized to <config> before and rendered literally, and now serializes to <config>, which remark parses as an html open tag and drops from the message entirely.
the three new tests only assert the serializer's output string so they can't see that. a case that goes through renderCachedMarkdown, or even just a plain-text angle-bracket case, would pin it. also worth importing getMarkdownFromEditor in the test rather than re-implementing its two regexes — as written the mirror can drift without failing.
Summary
The upstream text serializer HTML-escaped
<and>before Markdown rendering. Inline code preserves those entity strings literally, so messages such as<repo root>/websitedisplayed as<repo root>/website.Related issue
N/A — no matching open issue or pull request found.
Testing
just ciManual regression case: type
`<repo root>/website`in the desktop composer and send it. The rendered inline code should keep the angle brackets instead of showing HTML entities.Before: the reported message displayed
<repo root>/website.After: the serializer regression test verifies the emitted Markdown remains
`<repo root>/website`.Original Bug